Merge "Change name of main page in Sardinian (sc)"
[lhc/web/wiklou.git] / includes / filerepo / file / ForeignAPIFile.php
index 8e0242d..3a75720 100644 (file)
@@ -184,11 +184,7 @@ class ForeignAPIFile extends File {
         *   null on error
         */
        public function getExtendedMetadata() {
-               if ( isset( $this->mInfo['extmetadata'] ) ) {
-                       return $this->mInfo['extmetadata'];
-               }
-
-               return null;
+               return $this->mInfo['extmetadata'] ?? null;
        }
 
        /**
@@ -318,16 +314,15 @@ class ForeignAPIFile extends File {
         * @return null|string
         */
        function getThumbPath( $suffix = '' ) {
-               if ( $this->repo->canCacheThumbs() ) {
-                       $path = $this->repo->getZonePath( 'thumb' ) . '/' . $this->getHashPath();
-                       if ( $suffix ) {
-                               $path .= $suffix . '/';
-                       }
-
-                       return $path;
-               } else {
+               if ( !$this->repo->canCacheThumbs() ) {
                        return null;
                }
+
+               $path = $this->repo->getZonePath( 'thumb' ) . '/' . $this->getHashPath();
+               if ( $suffix ) {
+                       $path .= $suffix . '/';
+               }
+               return $path;
        }
 
        /**